package com.power.leopard.remote.provider.process;

import java.util.ArrayList;
import java.util.List;

public class ProviderProcessInterceptorFactory {

	private static List<ProviderProcessInterceptor> interceptors = new ArrayList<ProviderProcessInterceptor>();

	public static List<ProviderProcessInterceptor> getInterceptors() {
		return interceptors;
	}

	public static boolean registerInterceptor(ProviderProcessInterceptor interceptor) {
		if (!interceptors.contains(interceptor)) {
			return interceptors.add(interceptor);
		}
		return false;
	}

	public static void unregisterInterceptor(ProviderProcessInterceptor interceptor) {
		interceptors.remove(interceptor);
	}
}
